package org.niu.array;

import java.util.Arrays;

public class ConstructRectangle {

        public int[] constructRectangle(int area) {

            int t = (int)Math.sqrt(area);
            int x=t,y=t;
            while(x<=y){
                if(x*y==area){
                    return new int[]{x,y};
                }else if(x*y<area){
                    y++;
                }else x--;
            }
            return new int[]{x,y};
}
}
